/**
 * Copyright (C) 2017-2018 pinganfang, Inc. All Rights Reserved.
 */
package com.pingan.haofang.searchcloud.solr.constants;

/**
 * @author huhailiang937
 * @date 2017年5月4日下午2:02:06
 * @since 1.0.0
 */
public class SolrConstant {

    public static final int SOLR_MAX_TIMEOUT_MS = 60000;

    public static String RESULT_SOLR_QUERY_KEY = "solrQuery";

    public static String RESULT_SQL_KEY = "solrSql";
    /**
     * 当SQL没加limit时 最大值
     */
    public static final int ROW_QUERY_MAX_SIZE = 500;

    public static final String SOLR_CONFIG_XML = "solrconfig.xml";

    public static final String GLOBAL_CHAR_SET_ENCODING = "UTF-8";

    public static final String SOLR_CONFIG_SAVE_PATH = "solrcloud_zk";

    public static final String SCHEMA_TEMPLET_ROOT = "com/pingan/haofang/searchcloud/solr/schema/";

    public static String[] SOLR_OTHERS_CONFIGS = {"currency.xml", "elevate.xml", "params.json", "protwords.txt",
            "stopwords.txt", "synonyms.txt"};

    public static String[] SOLR_LANG_CONFIGS = {"contractions_ca.txt", "contractions_fr.txt", "contractions_ga.txt",
            "contractions_it.txt", "hyphenations_ga.txt", "stemdict_nl.txt", "stoptags_ja.txt", "stopwords_ar.txt",
            "stopwords_bg.txt", "stopwords_ca.txt", "stopwords_cz.txt", "stopwords_da.txt", "stopwords_de.txt",
            "stopwords_el.txt", "stopwords_en.txt", "stopwords_es.txt", "stopwords_eu.txt", "stopwords_fa.txt",
            "stopwords_fi.txt", "stopwords_fr.txt", "stopwords_ga.txt", "stopwords_gl.txt", "stopwords_hi.txt",
            "stopwords_hu.txt", "stopwords_hy.txt", "stopwords_id.txt", "stopwords_it.txt", "stopwords_ja.txt",
            "stopwords_lv.txt", "stopwords_nl.txt", "stopwords_no.txt", "stopwords_pt.txt", "stopwords_ro.txt",
            "stopwords_ru.txt", "stopwords_sv.txt", "stopwords_th.txt", "stopwords_tr.txt", "userdict_ja.txt"};


    /**
     * 搜索云alias前缀
     */
    public static final String ALIAS_PREFIX = "searchcloud_";

    public static final String AGG_PREFIX = "agg_";

    public static final String HTTP_URL_PREFIX = "http://";

    /**
     * 物理大小转化单位
     */
    public static int BYTE_UNIT = 1024;

    /**
     * 超时时间
     */
    public static int TIME_OUT_TEN_SECOND = 10000;

    public static String IS_NULL = "null";

    /**
     * 计算转化单位
     */
    public static final int HUNDRED_UNIT = 100;
    public static final int THOUSAND_UNIT = 1000;

}